<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MainView
 *
 * @author mateusz.ledzewicz
 */
class ViewCharts extends ChartsScreen{
    //put your code here
        
    public function load() {
        parent::load();
        $this->chooseView('');
        
    }
    
    protected function runLoad()
    {
        $this->addHead("<script type=\"text/javascript\"
          src=\"https://www.google.com/jsapi?autoload={
            'modules':[{
              'name':'visualization',
              'version':'1',
              'packages':['corechart']
            }]
          }\"></script>

    <script type=\"text/javascript\">
      google.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          __chartDataHeader__
          __chartData__
        ]);

        var options = {
          title: '__chartTitle__',
          legend: { position: 'bottom' }
        };

        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>");
    }
    
    
  
}

?>
